@using Piranha.Manager.Editor
<script>
    piranha.editorconfig = new function() {
        "use strict";

        this.plugins = "@EditorConfig.Current.Plugins";
        this.toolbar = "@EditorConfig.Current.Toolbar";
        this.extended_valid_elements = "@EditorConfig.Current.ExtendedValidElements";
        this.block_formats = "@EditorConfig.Current.BlockFormats";
        this.style_formats = [
            @foreach (var style in EditorConfig.Current.StyleFormats)
            {
                if (style.Type == EditorStyleType.Block)
                {
<text>            { title: "@style.Title", block: "@style.Tag"@Html.Raw(style.HasClasses ? ", classes: \"" + style.Classes + "\"" : "") },
</text>
                }
                else if (style.Type == EditorStyleType.Format)
                {
<text>            { title: "@style.Title", format: "@style.Tag"@Html.Raw(style.HasClasses ? ", classes: \"" + style.Classes + "\"" : "") },
</text>
                }
                else if (style.Type == EditorStyleType.Inline)
                {
<text>            { title: "@style.Title", inline: "@style.Tag"@Html.Raw(style.HasClasses ? ", classes: \"" + style.Classes + "\"" : "") },
</text>
                }
            }
        ];
    };
</script>
